package com.bootx.config;

import dev.langchain4j.model.chat.StreamingChatModel;
import dev.langchain4j.model.ollama.OllamaStreamingChatModel;
import dev.langchain4j.model.openai.OpenAiStreamingChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author black
 */
@Component
public class StreamingChatModalConfig {

    @Bean("openAiStreamingChatModel1")
    public StreamingChatModel openAiChatModel() {
        return OpenAiStreamingChatModel.builder()
                .apiKey("yUyo58hK1jDC7F6mF9Whg0fiSK3o4t1U5C5Ld7vd9Qo8d15I")
                .modelName("gpt-5-chat-latest")
                .baseUrl("https://api.yourouter.ai/v1")
                .build();
    }

    @Bean("ollamaStreamingChatModel1")
    public StreamingChatModel ollamaStreamingChatModel() {
        return OllamaStreamingChatModel.builder()
                .baseUrl("http://localhost:11434")
                .modelName("gemma3")
                .build();
    }

    @Bean("deepSeekStreamingChatModel1")
    public StreamingChatModel deepSeekStreamingChatModel() {
        return OpenAiStreamingChatModel.builder()
                .apiKey("sk-42c47fb5ac404dbc96a1f01a36f950d1")
                .modelName("deepseek-chat")
                .baseUrl("https://api.deepseek.com/v1")
                .build();
    }


}
